 <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_html">
<div class="padding20px">    
    <div class="insm-col1">
        <label>Select Day</label>
    </div>
    <div class="insm-col2 bootstrap-timepicker">
        <label>Start Time</label>
    </div>

    <div class="insm-col2 bootstrap-timepicker">
        <label>End Time</label>
        <div class="clear"></div> 
    </div>

    <div class="insm-col3 ">
        <label style="margin:4px 0px 15px 9px">Flexible</label>            
    </div>
    <div class="clear"></div> 
    
    <?php
 
    for ($dayIndex=0;$dayIndex <count($daySesion); $dayIndex++) {      
        $daySessionIs_flexible = ($daySesion[$dayIndex]->is_flexible==1) ? '1' : '0';
         $addClass = ($daySesion[$dayIndex]->is_flexible==1) ? '' : 'hastimePicker requiredfield';
        
        ?>
        <div class="venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_<?php echo $dayIndex; ?>">
            
                <div class="insm-col1">                
                    <div class="clear"></div> 
                    <?php echo CHtml::dropDownList('CourseBatcheDaySession[CourseBatche][' . $batchIndex . '][ClassVenue][' . $venueIndex . '][schedule_id][]', $daySesion[$dayIndex]->schedule_id, getAllSchedule('course'), array('class' => 'courseselectBox requiredfield ClassDaySession_schedule_id_' . $dayIndex, 'id' => 'course_venue_' . $venueIndex . '_batch_' . $batchIndex . '_daySession_schedule_id_' . $dayIndex)); ?>
                    <div class="errorMessage" id="error_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_schedule_id_<?php echo $dayIndex; ?>" style="display:none">Schedule cannot be blank.</div>
                </div>
                <div class="insm-col2 bootstrap-timepicker">                   
                    <div class="clear"></div> 
                    <input onclick="hastimePicker(this.id)" onpaste="return false;" onblur="checkValueEmpty(this.id);"  name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][time_from][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_from_<?php echo $dayIndex; ?>" type="text" onkeypress="return isNumberKey(event)" class=" field small <?php echo $addClass;?> " value="<?php echo $daySesion[$dayIndex]->time_from; ?>" onchange="timeCheck(this.id)">
                    <div class="errorMessage" id="error_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_from_<?php echo $dayIndex; ?>" style="display:none">Start time cannot be blank.</div>
                </div>

                <div class="insm-col2 bootstrap-timepicker">                    
                    <div class="clear"></div> 
                    <input name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][time_to][]" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dayIndex; ?>" class="field small <?php echo $addClass;?>" onclick="hastimePicker(this.id)" onpaste="return false;" onblur="checkValueEmpty(this.id)" type="text"   size="10" value="<?php echo $daySesion[$dayIndex]->time_to; ?>" onchange="timeCheck(this.id)">
                    <div class="errorMessage" id="error_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dayIndex; ?>" style="display:none">End time cannot be blank.</div>
                    <div class="errorMessage" id="endTime_course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_time_to_<?php echo $dayIndex; ?>" ></div>
                </div>

                <div class="insm-col3 customeform ">                  
                    <div class="clear"></div> 
                    <input <?php if ($daySesion[$dayIndex]->is_flexible) { ?>checked="checked"<?php } ?> type="checkbox" class="isdaySesionFlexble" value="<?php echo $daySesion[$dayIndex]->is_flexible; ?>" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexible_<?php echo $dayIndex; ?>" onclick="return isFlexibleDaySession(this.id);" name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][is_flexible][]" >
                    <input type="hidden" name="CourseBatcheDaySession[CourseBatche][<?php echo $batchIndex; ?>][ClassVenue][<?php echo $venueIndex; ?>][is_flexiblevalue][]" value="<?php echo $daySessionIs_flexible; ?>" id="course_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_is_flexiblevalue_<?php echo $dayIndex; ?>"/>
                    <?php if($dayIndex>0) {?><p class="isFlexbleRemove"><a class="link-remove" id="remove_venue_<?php echo $venueIndex; ?>_batch_<?php echo $batchIndex; ?>_daySession_<?php echo $dayIndex; ?>" onclick="removeDaySession(this.id);"><span>Remove</span></a></p><?php } ?>
                </div>
                <div class="clear"></div>                                                       	
           
        </div>

        <?php
    }
    ?>
 </div></div>